package com.tegtech.module.captcha.service.impl;

import org.springframework.stereotype.Service;

import com.tegtech.common.utils.MessageUtils;
import com.tegtech.module.captcha.domain.CaptchaRule;
import com.tegtech.module.captcha.service.AbstractCaptchaMessageService;
import com.tegtech.starter.email.EmailSupport;

/**
 * 邮箱验证码实现类
 * @Author Jun
 * @date 2021年5月20日 下午4:39:15
 */
@Service
public class EmailCaptchaMessage extends AbstractCaptchaMessageService {

	@Override
	protected void sendCaptchaMessage(String account, String code, CaptchaRule captchaRule) {
		String subject = MessageUtils.message("email.captcha.subject");
		String content = MessageUtils.message("email.captcha.content", code);
		EmailSupport.send(account, subject, content, false);
	}

}
